package com.itheima;
public class Student
//        implements Comparable<Student>
{
    String name;
    Integer age;

    public Student(String name, Integer age) {
        this.name = name;
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public Integer getAge() {
        return age;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

//    @Override
//    public int compareTo(Student o) {
//        //按年龄正序排序（当前学生年龄-被比较学生的年龄）
//        return this.getAge()-o.getAge();
//    }

//    @Override
//    public String toString() {
//        return "Student{" +
//                "name='" + name + '\'' +
//                ", age=" + age +
//                '}';
//    }
}